package com.wangjie.arrays;

import java.util.Arrays;

public class ArraysDemo {

    public static void main(String[] args) {
        int [] arr = {1,3,2,7,5};
        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        String str = "sdfdasfgsdhfgsdfsdjfhjsdakhfdsafhdskl";
        char[] chars = str.toCharArray();
        Arrays.sort(chars);
        for (int i = chars.length-1; i > 0; i--) {
            System.out.print(chars[i] + "\t");
        }

        String str2 = chars.toString();
        System.out.println(str2);

        String str3 = new String(chars);
        System.out.println(str3);
    }
}
